{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "e9220533-845d-4da3-88cf-4e204859b2e2",
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy import assoc_legendre,integrate,simplify\n",
    "from sympy.abc import x"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "0c2e8fdd-6be8-4c2c-96e1-c1d60907271f",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle 0$"
      ],
      "text/plain": [
       "0"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# m相同，阶l不同，m=1\n",
    "integrate(assoc_legendre(2,1,x)*assoc_legendre(3,1,x), (x, -1, 1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "a1aff26c-da51-4c64-aa62-a6dee8b57eb3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle - \\frac{48}{7}$"
      ],
      "text/plain": [
       "-48/7"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# m不同，阶l相同，m=1\n",
    "integrate(assoc_legendre(3,3,x)*assoc_legendre(3,1,x), (x, -1, 1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "617f05d7-a267-4640-b99a-5fd38e88bd84",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
